#!/bin/sh
set -e

mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
  -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS \
  -DCPP-NETLIB_ENABLE_HTTPS=$ENABLE_HTTPS \
  -DCPP-NETLIB_BUILD_EXAMPLES=OFF \
  -DCPP-NETLIB_BUILD_DOCS=$BUILD_DOCS \
  -DUri_BUILD_TESTS=$BUILD_TESTS \
  -DUri_BUILD_DOCS=$BUILD_DOCS \
  -DUri_DISABLE_LIBCXX=$Uri_DISABLE_LIBCXX \
  -DCMAKE_CXX_FLAGS="-std=c++11 ${CMAKE_CXX_FLAGS}" \
  ..
make
make test
cd ..
